Optimal. Leaf size=80 \[ \frac{a^2 (e x)^n}{e n}-\frac{2 a b x^{-n} (e x)^n \tanh ^{-1}\left (\cosh \left (c+d x^n\right )\right )}{d e n}-\frac{b^2 x^{-n} (e x)^n \coth \left (c+d x^n\right )}{d e n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.102105, antiderivative size = 80, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.273, Rules used = {5441, 5437, 3773, 3770, 3767, 8} \[ \frac{a^2 (e x)^n}{e n}-\frac{2 a b x^{-n} (e x)^n \tanh ^{-1}\left (\cosh \left (c+d x^n\right )\right )}{d e n}-\frac{b^2 x^{-n} (e x)^n \coth \left (c+d x^n\right )}{d e n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5441
Rule 5437
Rule 3773
Rule 3770
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int (e x)^{-1+n} \left (a+b \text{csch}\left (c+d x^n\right )\right )^2 \, dx &=\frac{\left (x^{-n} (e x)^n\right ) \int x^{-1+n} \left (a+b \text{csch}\left (c+d x^n\right )\right )^2 \, dx}{e}\\ &=\frac{\left (x^{-n} (e x)^n\right ) \operatorname{Subst}\left (\int (a+b \text{csch}(c+d x))^2 \, dx,x,x^n\right )}{e n}\\ &=\frac{a^2 (e x)^n}{e n}+\frac{\left (2 a b x^{-n} (e x)^n\right ) \operatorname{Subst}\left (\int \text{csch}(c+d x) \, dx,x,x^n\right )}{e n}+\frac{\left (b^2 x^{-n} (e x)^n\right ) \operatorname{Subst}\left (\int \text{csch}^2(c+d x) \, dx,x,x^n\right )}{e n}\\ &=\frac{a^2 (e x)^n}{e n}-\frac{2 a b x^{-n} (e x)^n \tanh ^{-1}\left (\cosh \left (c+d x^n\right )\right )}{d e n}-\frac{\left (i b^2 x^{-n} (e x)^n\right ) \operatorname{Subst}\left (\int 1 \, dx,x,-i \coth \left (c+d x^n\right )\right )}{d e n}\\ &=\frac{a^2 (e x)^n}{e n}-\frac{2 a b x^{-n} (e x)^n \tanh ^{-1}\left (\cosh \left (c+d x^n\right )\right )}{d e n}-\frac{b^2 x^{-n} (e x)^n \coth \left (c+d x^n\right )}{d e n}\\ \end{align*}
Mathematica [A] time = 0.367261, size = 87, normalized size = 1.09 \[ \frac{x^{-n} (e x)^n \left (2 a \left (a c+a d x^n+2 b \log \left (\tanh \left (\frac{1}{2} \left (c+d x^n\right )\right )\right )\right )-b^2 \tanh \left (\frac{1}{2} \left (c+d x^n\right )\right )+b^2 \left (-\coth \left (\frac{1}{2} \left (c+d x^n\right )\right )\right )\right )}{2 d e n} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.115, size = 271, normalized size = 3.4 \begin{align*}{\frac{{a}^{2}x}{n}{{\rm e}^{{\frac{ \left ( -1+n \right ) \left ( -i\pi \,{\it csgn} \left ( ie \right ){\it csgn} \left ( ix \right ){\it csgn} \left ( iex \right ) +i\pi \,{\it csgn} \left ( ie \right ) \left ({\it csgn} \left ( iex \right ) \right ) ^{2}+i\pi \,{\it csgn} \left ( ix \right ) \left ({\it csgn} \left ( iex \right ) \right ) ^{2}-i \left ({\it csgn} \left ( iex \right ) \right ) ^{3}\pi +2\,\ln \left ( x \right ) +2\,\ln \left ( e \right ) \right ) }{2}}}}}-2\,{\frac{x{b}^{2}{{\rm e}^{1/2\, \left ( -1+n \right ) \left ( -i\pi \,{\it csgn} \left ( ie \right ){\it csgn} \left ( ix \right ){\it csgn} \left ( iex \right ) +i\pi \,{\it csgn} \left ( ie \right ) \left ({\it csgn} \left ( iex \right ) \right ) ^{2}+i\pi \,{\it csgn} \left ( ix \right ) \left ({\it csgn} \left ( iex \right ) \right ) ^{2}-i \left ({\it csgn} \left ( iex \right ) \right ) ^{3}\pi +2\,\ln \left ( x \right ) +2\,\ln \left ( e \right ) \right ) }}}{d{x}^{n}n \left ({{\rm e}^{2\,c+2\,d{x}^{n}}}-1 \right ) }}-4\,{\frac{ba{e}^{n}{\it Artanh} \left ({{\rm e}^{c+d{x}^{n}}} \right ){{\rm e}^{-i/2\pi \,{\it csgn} \left ( iex \right ) \left ( -1+n \right ) \left ( -{\it csgn} \left ( iex \right ) +{\it csgn} \left ( ix \right ) \right ) \left ( -{\it csgn} \left ( iex \right ) +{\it csgn} \left ( ie \right ) \right ) }}}{ned}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.46273, size = 2890, normalized size = 36.12 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (e x\right )^{n - 1} \left (a + b \operatorname{csch}{\left (c + d x^{n} \right )}\right )^{2}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \operatorname{csch}\left (d x^{n} + c\right ) + a\right )}^{2} \left (e x\right )^{n - 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]